package cn.lhjl.day06;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        LinkedList<String> list = new LinkedList<>();
        list.add("2");
        list.add("3");
        list.add("4");
        list.add("5");
        list.addFirst("www");
        list.addLast("www");
        list.removeFirst();
        list.removeLast();
        list.push("www");
        list.push("www");
        System.out.println(list);
        System.out.println(list.pop());
        System.out.println(list.pop());
        System.out.println(list.pop());
        System.out.println(list.pop());
        System.out.println(list.pop());
        System.out.println(list.pop());
        System.out.println(list.getFirst());


        System.out.println(list);
    }


}
